package com.softwarerusher.model;

/**
 * TInstoredetailId entity.
 * 
 * @author MyEclipse Persistence Tools
 */

public class TInstoredetailId implements java.io.Serializable {

	// Fields

	private TBook TBook;
	private Integer instoreNum;
	private Double instorePrice;
	private TInstore TInstore;

	// Constructors

	/** default constructor */
	public TInstoredetailId() {
	}

	/** full constructor */
	public TInstoredetailId(TBook TBook, Integer instoreNum,
			Double instorePrice, TInstore TInstore) {
		this.TBook = TBook;
		this.instoreNum = instoreNum;
		this.instorePrice = instorePrice;
		this.TInstore = TInstore;
	}

	// Property accessors

	public TBook getTBook() {
		return this.TBook;
	}

	public void setTBook(TBook TBook) {
		this.TBook = TBook;
	}

	public Integer getInstoreNum() {
		return this.instoreNum;
	}

	public void setInstoreNum(Integer instoreNum) {
		this.instoreNum = instoreNum;
	}

	public Double getInstorePrice() {
		return this.instorePrice;
	}

	public void setInstorePrice(Double instorePrice) {
		this.instorePrice = instorePrice;
	}

	public TInstore getTInstore() {
		return this.TInstore;
	}

	public void setTInstore(TInstore TInstore) {
		this.TInstore = TInstore;
	}

	public boolean equals(Object other) {
		if ((this == other))
			return true;
		if ((other == null))
			return false;
		if (!(other instanceof TInstoredetailId))
			return false;
		TInstoredetailId castOther = (TInstoredetailId) other;

		return ((this.getTBook() == castOther.getTBook()) || (this.getTBook() != null
				&& castOther.getTBook() != null && this.getTBook().equals(
				castOther.getTBook())))
				&& ((this.getInstoreNum() == castOther.getInstoreNum()) || (this
						.getInstoreNum() != null
						&& castOther.getInstoreNum() != null && this
						.getInstoreNum().equals(castOther.getInstoreNum())))
				&& ((this.getInstorePrice() == castOther.getInstorePrice()) || (this
						.getInstorePrice() != null
						&& castOther.getInstorePrice() != null && this
						.getInstorePrice().equals(castOther.getInstorePrice())))
				&& ((this.getTInstore() == castOther.getTInstore()) || (this
						.getTInstore() != null
						&& castOther.getTInstore() != null && this
						.getTInstore().equals(castOther.getTInstore())));
	}

	public int hashCode() {
		int result = 17;

		result = 37 * result
				+ (getTBook() == null ? 0 : this.getTBook().hashCode());
		result = 37
				* result
				+ (getInstoreNum() == null ? 0 : this.getInstoreNum()
						.hashCode());
		result = 37
				* result
				+ (getInstorePrice() == null ? 0 : this.getInstorePrice()
						.hashCode());
		result = 37 * result
				+ (getTInstore() == null ? 0 : this.getTInstore().hashCode());
		return result;
	}

}